﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CrystalReportPrintLibrary
{
    public partial class CrystalReportPrintViewer : Form
    {
        private CrystalDecisions.CrystalReports.Engine.ReportDocument _orpt;
        /// <summary>
        /// 报表文档
        /// </summary>
        public CrystalDecisions.CrystalReports.Engine.ReportDocument orpt
        {
            get { return _orpt; }
            set { _orpt = value; }
        }

        public CrystalReportPrintViewer()
        {
            InitializeComponent();
        }

        private void CrystalReportPrintViewer_Load(object sender, EventArgs e)
        {
            try
            {
                CrystalReportViewer.ReportSource = orpt;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
    }
}